﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Netstars.Core.Cache
{
    /// <summary>
    /// 指定一项缓存逐出和过期详细信息
    /// </summary>
    public class CacheItemPolicy
    {
        /// <summary>
        /// 缓存项的键名
        /// </summary>
        public string Key { set; get; }
        /// <summary>
        /// 缓存的项值
        /// </summary>
        public object Value { set; get; }
        /// <summary>
        /// 缓存文件依赖
        /// </summary>
        public CacheDependency Dependencies { set; get; }
        /// <summary>
        /// 绝对到期时间
        /// </summary>
        public DateTime AbsoluteExpiration { set; get; }
        /// <summary>
        /// 可调到期时间
        /// </summary>
        public TimeSpan SlidingExpiration { set; get; }
        /// <summary>
        /// 缓存优先级
        /// </summary>
        public CacheItemPriority Priority { set; get; }
        /// <summary>
        /// 移除时的通知
        /// </summary>
        public CacheItemRemovedCallback OnRemoveCallback { set; get; }
    }
}
